INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${3RDPARTY_DIR}/include/gdal)

SET(LIB_NAME OCGIS)

SET(TARGET_H
	GISDef.h
	GISReader.h
    ShpUtil.h
    GDALCPP.h
	TiffVolume.h
	TiffWriter.h
	TiffTiling.h
	ExactExtract.h
	exactextract/box.h
	exactextract/side.h
	exactextract/crossing.h
	exactextract/coordinate.h
	exactextract/cell.h
	exactextract/traversal.h
	exactextract/geos_utils.h
	exactextract/deferred_gdal_writer.h
	exactextract/operation.h
	exactextract/feature.h
	exactextract/grid.h
	exactextract/raster_source.h
	exactextract/raster_stats.h
	exactextract/stats_registry.h
	exactextract/gdal_feature.h
	exactextract/gdal_feature_unnester.h
	exactextract/measures.h
	exactextract/traversal_areas.h
	exactextract/gdal_writer.h
	exactextract/map_feature.h
	exactextract/utils.h
	exactextract/stats_registry.h
	exactextract/weighted_quantiles.h
	exactextract/perimeter_distance.h
	exactextract/output_writer.h
	exactextract/gdal_dataset_wrapper.h
	exactextract/feature_sequential_processor.h
	exactextract/raster_sequential_processor.h
	exactextract/raster_cell_intersection.h
	exactextract/floodfill.h
	exactextract/utils_cli.h
	exactextract/gdal_dataset_wrapper.h
	exactextract/gdal_raster_wrapper.h
)

SET(TARGET_SRC
	src/ExactExtract.cpp
	src/GISReader.cpp
	src/ShpUtil.cpp
	src/GDALCPP.cpp
	src/TiffVolume.cpp
	src/TiffWriter.cpp
	src/TiffTiling.cpp
	exactextract/box.cpp
	exactextract/side.cpp
	exactextract/coordinate.cpp
	exactextract/cell.cpp
	exactextract/traversal.cpp
	exactextract/geos_utils.cpp
	exactextract/deferred_gdal_writer.cpp
	exactextract/operation.cpp
	exactextract/feature.cpp
	exactextract/grid.cpp
	exactextract/measures.cpp
	exactextract/traversal_areas.cpp
	exactextract/gdal_writer.cpp
	exactextract/utils.cpp
	exactextract/stats_registry.cpp
	exactextract/weighted_quantiles.cpp
	exactextract/perimeter_distance.cpp
	exactextract/output_writer.cpp
	exactextract/gdal_dataset_wrapper.cpp
	exactextract/feature_sequential_processor.cpp
	exactextract/raster_sequential_processor.cpp
	exactextract/raster_cell_intersection.cpp
	exactextract/floodfill.cpp
	exactextract/utils_cli.cpp
	exactextract/gdal_dataset_wrapper.cpp
	exactextract/gdal_raster_wrapper.cpp
)

SETUP_GROUP()

SET(TARGET_LIBRARIES
    OCMain
    OCVolume
    OCesium
)

SET(TARGET_EXTERNAL_LIBRARIES 
    gdal
	geos
	geos_c
)

SETUP_LIBRARY(${LIB_NAME})

ADD_DEPENDENCIES(${LIB_NAME} OCMain)
